<!--
*Author：
 *Contact：
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/EQU_EQUIPMENT.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/EQU_EQUIPMENT.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '设备基础信息表',
                name: 'workbusiness/EQU_EQUIPMENT',
                url: "/EQU_EQUIPMENT/",
                sortName: "EquipmentType"
            });
            const editFormFields = ref({"EquipmentCode":"","EquipmentNameZH":"","EquipmentType":"","Description":"","host":"","port":"","CommunicationType":"","MaxKnifeLength":"","HolderTypeId":"","StateCode":"","ProcessingMaterial":[],"EquCommds":[],"AvoidX":"","AvoidY":"","CurrentX":"","CurrentY":"","process_precision":[],"change_tool_x":"","change_tool_y":"","change_tool_z":"","process_type":[],"g54_supplement":"","itinerary_y":"","EquipmentNo":"","itinerary_x":"","itinerary_z":"","MaxLoadCapacity":"","WorkCenterId":"","basic_x":"","basic_y":"","basic_z":"","IsException":"","Content5":"","Context6":"","Context7":"","Content1000":"","XLocation":"","RotationalSpeed":"","Max_reality_R":"","Img":"","Location":"","ZIndex":"","FenceGate":""});
            const editFormOptions = ref([[{"title":"设备编码","field":"EquipmentCode","type":"text"},
                               {"title":"设备名称","field":"EquipmentNameZH","type":"text"},
                               {"dataKey":"设备类型","data":[],"title":"设备类型","field":"EquipmentType","type":"select"},
                               {"title":"描述1","field":"Description","type":"text"}],
                              [{"title":"主机地址","field":"host","type":"text"},
                               {"title":"端口号","field":"port","type":"text"},
                               {"dataKey":"通讯方式","data":[],"title":"通信方式","field":"CommunicationType","type":"select"},
                               {"title":"机床最大刀长","field":"MaxKnifeLength","type":"decimal"}],
                              [{"dataKey":"设备状态","data":[],"title":"设备状态","field":"StateCode","type":"select"},
                               {"dataKey":"加工材质","data":[],"title":"加工材质","field":"ProcessingMaterial","type":"selectList"},
                               {"dataKey":"设备指令","data":[],"title":"设备指令","field":"EquCommds","type":"selectList"},
                               {"dataKey":"刀柄类型","data":[],"title":"刀柄类型","field":"HolderTypeId","type":"select"}],
                              [{"title":"避让点X","field":"AvoidX","type":"decimal"},
                               {"title":"避让点Y","field":"AvoidY","type":"decimal"},
                               {"title":"当前点X","field":"CurrentX","type":"decimal"},
                               {"title":"当前点Y","field":"CurrentY","type":"decimal"}],
                              [{"dataKey":"加工精度","data":[],"title":"加工精度","field":"process_precision","type":"selectList"},
                               {"title":"换刀位置x","field":"change_tool_x","type":"text"},
                               {"title":"换刀位置Y","field":"change_tool_y","type":"text"},
                               {"title":"换刀位置z","field":"change_tool_z","type":"text"}],
                              [{"title":"设备序号","field":"EquipmentNo","type":"number"},
                               {"dataKey":"加工类型","data":[],"title":"加工类型","field":"process_type","type":"selectList"},
                               {"title":"对刀仪基准距加工平台距离","required":true,"field":"g54_supplement","type":"text"},
                               {"title":"行程Y","field":"itinerary_y","type":"text"}],
                              [{"title":"最大承重KG","field":"MaxLoadCapacity","type":"decimal"},
                               {"dataKey":"工作中心","data":[],"title":"线","field":"WorkCenterId","type":"select"},
                               {"title":"行程X","field":"itinerary_x","type":"text"},
                               {"title":"行程Z","field":"itinerary_z","type":"text"}],
                              [{"title":"是否异常","field":"IsException","type":"text"},
                               {"title":"原始基准点X","required":true,"field":"basic_x","type":"decimal"},
                               {"title":"原始基准点Y","required":true,"field":"basic_y","type":"decimal"},
                               {"title":"原始基准点Z","required":true,"field":"basic_z","type":"decimal"}],
                              [{"title":"O0995","field":"Content5","type":"textarea"},
                               {"title":"O0996","field":"Context6","type":"textarea"},
                               {"title":"O0997","field":"Context7","type":"textarea"},
                               {"title":"1000","field":"Content1000","type":"textarea"}],
                              [{"title":"转速","field":"RotationalSpeed","type":"decimal"},
                               {"title":"最大R角","field":"Max_reality_R","type":"decimal"},
                               {"title":"产线X值","field":"XLocation","type":"decimal"}],
                              [{"title":"测量工具位置","field":"Location","type":"decimal"},
                               {"title":"刀补值","field":"ZIndex","type":"decimal"},
                               {"title":"栅栏门","field":"FenceGate","type":"text"},
                               {"title":"图","field":"Img","type":"img"}]]);
            const searchFormFields = ref({"EquipmentCode":"","IsOnline":"","EquipmentType":[],"MaxLoadCapacity":""});
            const searchFormOptions = ref([[{"dataKey":"是否在线","data":[],"title":"在线或离线","field":"IsOnline","type":"select"},{"dataKey":"设备类型","data":[],"title":"设备类型","field":"EquipmentType","type":"selectList"},{"title":"最大承重KG","field":"MaxLoadCapacity","type":"decimal"},{"title":"设备编码","field":"EquipmentCode","type":"text"}]]);
            const columns = ref([{field:'Id',title:'Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'EquipmentCode',title:'设备编码',type:'string',link:true,width:110,align:'left',sort:true},
                       {field:'IsOnline',title:'在线或离线',type:'bool',bind:{ key:'是否在线',data:[]},width:100,align:'left'},
                       {field:'HolderTypeId',title:'刀柄类型',type:'string',bind:{ key:'刀柄类型',data:[]},width:120,align:'left'},
                       {field:'EquipmentNameZH',title:'设备名称',type:'string',width:110,align:'left'},
                       {field:'EquipmentType',title:'设备类型',type:'string',bind:{ key:'设备类型',data:[]},width:120,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'host',title:'主机地址',type:'string',width:120,align:'left'},
                       {field:'port',title:'端口号',type:'int',width:80,align:'left'},
                       {field:'CommunicationType',title:'通信方式',type:'string',bind:{ key:'通讯方式',data:[]},width:120,align:'left'},
                       {field:'Img',title:'图',type:'string',width:100,align:'left'},
                       {field:'XLocation',title:'产线X值',type:'decimal',width:110,align:'left'},
                       {field:'IsBaseLocation',title:'是否原点',type:'bool',width:110,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsOccupyPath',title:'是否占用路径',type:'string',bind:{ key:'是否占用线体',data:[]},width:110,align:'left'},
                       {field:'StateCode',title:'设备状态',type:'int',bind:{ key:'设备状态',data:[]},width:80,align:'left'},
                       {field:'Specification',title:'规格',type:'string',width:120,align:'left'},
                       {field:'ProcessingMaterial',title:'加工材质',type:'string',bind:{ key:'加工材质',data:[]},width:120,align:'left'},
                       {field:'CurrentOrder',title:'当前工单',type:'string',width:120,align:'left'},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,hidden:true,align:'left'},
                       {field:'Description',title:'描述1',type:'string',width:220,hidden:true,align:'left'},
                       {field:'Status',title:'新建/激活/保留/废除',type:'string',width:110,hidden:true,align:'left'},
                       {field:'name',title:'机床名称',type:'string',width:120,align:'left'},
                       {field:'latheSpec',title:'机床规格',type:'string',width:120,hidden:true,align:'left'},
                       {field:'machine_type',title:'机床系统',type:'string',width:100,align:'left'},
                       {field:'process_type',title:'加工类型',type:'string',bind:{ key:'加工类型',data:[]},width:100,align:'left'},
                       {field:'tool_height',title:'夹爪平台高度',type:'decimal',width:110,align:'left'},
                       {field:'g54_supplement',title:'对刀仪基准距加工平台距离',type:'decimal',width:160,require:true,align:'left'},
                       {field:'process_precision',title:'加工精度',type:'string',bind:{ key:'加工精度',data:[]},width:100,align:'left'},
                       {field:'itinerary_x',title:'行程X',type:'decimal',width:110,align:'left'},
                       {field:'itinerary_y',title:'行程Y',type:'decimal',width:110,align:'left'},
                       {field:'itinerary_z',title:'行程Z',type:'decimal',width:110,align:'left'},
                       {field:'basic_x',title:'原始基准点X',type:'decimal',width:110,require:true,align:'left'},
                       {field:'basic_y',title:'原始基准点Y',type:'decimal',width:110,require:true,align:'left'},
                       {field:'basic_z',title:'原始基准点Z',type:'decimal',width:110,require:true,align:'left'},
                       {field:'change_tool_x',title:'换刀位置x',type:'decimal',width:110,align:'left'},
                       {field:'change_tool_y',title:'换刀位置Y',type:'decimal',width:110,align:'left'},
                       {field:'change_tool_z',title:'换刀位置z',type:'decimal',width:110,align:'left'},
                       {field:'feed_x',title:'上料位置x',type:'decimal',width:110,align:'left'},
                       {field:'feed_y',title:'上料位置y',type:'decimal',width:110,align:'left'},
                       {field:'feed_z',title:'上料位置z',type:'decimal',width:110,align:'left'},
                       {field:'unit',title:'机床编号',type:'int',width:80,align:'left'},
                       {field:'nc_type',title:'NC类型',type:'string',width:100,align:'left'},
                       {field:'nc_card_no',title:'NC卡编号',type:'string',width:100,align:'left'},
                       {field:'use_status',title:'使用状态',type:'bool',width:110,align:'left'},
                       {field:'CurrentSubPathNo',title:'设备当前点位',type:'int',width:80,align:'left'},
                       {field:'TargetSubPathNo',title:'目标点位',type:'int',width:80,align:'left'},
                       {field:'RangeR',title:'范围右',type:'int',width:80,align:'left'},
                       {field:'RangeL',title:'范围左',type:'int',width:80,align:'left'},
                       {field:'MachineRange',title:'加工范围',type:'string',width:120,align:'left'},
                       {field:'EquCommds',title:'设备指令',type:'string',bind:{ key:'设备指令',data:[]},width:220,align:'left'},
                       {field:'AvoidX',title:'避让点X',type:'decimal',width:110,align:'left'},
                       {field:'AvoidY',title:'避让点Y',type:'decimal',width:110,align:'left'},
                       {field:'CurrentX',title:'当前点X',type:'decimal',width:110,align:'left'},
                       {field:'CurrentY',title:'当前点Y',type:'decimal',width:110,align:'left'},
                       {field:'Location',title:'测量工具位置',type:'decimal',width:110,align:'left'},
                       {field:'MaxLoadCapacity',title:'最大承重KG',type:'decimal',width:110,align:'left'},
                       {field:'YearTotalTime',title:'年总使用时间',type:'decimal',width:110,align:'left'},
                       {field:'MaxKnifeLength',title:'机床最大刀长',type:'decimal',width:110,align:'left'},
                       {field:'EquipmentNo',title:'设备序号',type:'string',width:110,align:'left'},
                       {field:'Door1',title:'Door1',type:'bool',width:110,align:'left'},
                       {field:'OpenedDoor1',title:'OpenedDoor1',type:'bool',width:110,align:'left'},
                       {field:'ClosedDoor1',title:'ClosedDoor1',type:'bool',width:110,align:'left'},
                       {field:'Door2',title:'Door2',type:'bool',width:110,align:'left'},
                       {field:'OpenedDoor2',title:'OpenedDoor2',type:'bool',width:110,align:'left'},
                       {field:'ClosedDoor2',title:'ClosedDoor2',type:'bool',width:110,align:'left'},
                       {field:'DuiDaoDoor',title:'DuiDaoDoor',type:'bool',width:110,align:'left'},
                       {field:'OpenedDuiDaoDoor',title:'OpenedDuiDaoDoor',type:'bool',width:110,align:'left'},
                       {field:'ClosedDuiDaoDoor',title:'ClosedDuiDaoDoor',type:'bool',width:110,align:'left'},
                       {field:'Dangliao',title:'Dangliao',type:'bool',width:110,align:'left'},
                       {field:'OpenedDangliao',title:'OpenedDangliao',type:'bool',width:110,align:'left'},
                       {field:'ClosedDangliao',title:'ClosedDangliao',type:'bool',width:110,align:'left'},
                       {field:'Ci',title:'Ci',type:'bool',width:110,align:'left'},
                       {field:'OpenedCi',title:'OpenedCi',type:'bool',width:110,align:'left'},
                       {field:'ClosedCi',title:'ClosedCi',type:'bool',width:110,align:'left'},
                       {field:'WarningCi',title:'WarningCi',type:'bool',width:110,align:'left'},
                       {field:'JiaDao',title:'JiaDao',type:'bool',width:110,align:'left'},
                       {field:'SongDao',title:'SongDao',type:'bool',width:110,align:'left'},
                       {field:'M30',title:'M30',type:'bool',width:110,align:'left'},
                       {field:'AllowShangXiaHuan',title:'AllowShangXiaHuan',type:'bool',width:110,align:'left'},
                       {field:'AllowHuanDao',title:'AllowHuanDao',type:'bool',width:110,align:'left'},
                       {field:'WorkCenterId',title:'线',type:'string',bind:{ key:'工作中心',data:[]},width:120,align:'left'},
                       {field:'OrderCode',title:'工单',type:'string',width:120,hidden:true,align:'left'},
                       {field:'RotationalSpeed',title:'转速',type:'decimal',width:110,align:'left'},
                       {field:'UpperProgramOn',title:'上位机在线时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'IsEnable',title:'使能',type:'bool',width:110,align:'left'},
                       {field:'RunStatus',title:'设备运行状态',type:'string',width:110,align:'left'},
                       {field:'RunTime',title:'运行时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Max_reality_R',title:'最大R角',type:'decimal',width:110,align:'left'},
                       {field:'IsException',title:'是否异常',type:'bool',width:110,align:'left'},
                       {field:'Content5',title:'O0995',type:'string',width:110,align:'left'},
                       {field:'Context6',title:'O0996',type:'string',width:110,align:'left'},
                       {field:'Context7',title:'O0997',type:'string',width:110,align:'left'},
                       {field:'Content1000',title:'1000',type:'string',width:110,align:'left'},
                       {field:'ZIndex',title:'刀补值',type:'decimal',width:110,align:'left'},
                       {field:'FenceGate',title:'栅栏门',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
